|
|
|
|
|
|
|
Day 13
Creating Databases with SQL |
|
|
|
|
|
|
|
|
On Day 13, you learned how to create, alter, and delete database table structures using DDL (Data Definition Language) SQL keywords. You also learned that using DDL statements to build tables, create indexes, and establish relationships is an excellent way to automatically document table layouts. You learned how to maintain database structures using the following DDL keywords: |
|
|
|
|
|
|
|
|
·CREATE TABLE enables you to create entirely new tables in your existing database. |
|
|
|
|
|
|
|
|
·DROP TABLE enables you to completely remove a table, including any data that is already in the table. |
|
|
|
|
|
|
|
|
·ALTER TABLE enables you to ADD a new column or DROP an existing column from the table without losing existing data in the other columns. |
|
|
|
|
|
|
|
|
·CREATE INDEX and DROP INDEX enable you to create indexes that can enforce data integrity or speed data access. |
|
|
|
|
|
|
|
|
· The CONSTRAINT clause can be added to the CREATE TABLE or ALTER TABLE statement to define relationships between tables using the FOREIGN KEY clause. |
|
|
|
|
|
|
|
|
Day 14
Error Handling in Visual Basic 5 |
|
|
|
|
|
|
|
|
The final lesson of the second week covered all the basics of creating your own error-handling routines for Visual Basic applications. You learned that an error handler has three basic parts: |
|
|
|
|
|
|
|
|
· The On Error Goto statement |
|
|
|
|
|
|
|
|
· The body of the error handler code |
|
|
|
|
|
|
|
|
You learned that an error handler has four possible exits: |
|
|
|
|
|
|
|
|
·Resume: Re-executes the code that caused the error. |
|
|
|
|
|
|
|
|
·Resume Next: Continues processing at the line immediately following the line that caused the error. |
|
|
|
|
|
|
|
|
·Resume label: Continues processing at the location identified by the label. |
|
|
|
|
|
|
|
|
·EXIT or END: EXIT ends processing for the current routine and END exits the program completely. |
|
|
|
|
|
|
|
|
You learned how to use the Err.Raise method to flag errors without resorting to modal dialog boxes. |
|
|
|
|
|